<!DOCTYPE html>
<html lang="en-US" dir="ltr">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1">
    <title>Acri-doc | Acri-doc</title>
    <meta name="description" content="A VitePress site">
    <meta name="generator" content="VitePress v1.0.0-rc.31">
    <link rel="preload stylesheet" href="/acri-doc/assets/style.wu2dC0mS.css" as="style">
    
    <script type="module" src="/acri-doc/assets/app.4C5QHJLS.js"></script>
    <link rel="preload" href="/acri-doc/assets/inter-roman-latin.bvIUbFQP.woff2" as="font" type="font/woff2" crossorigin="">
    <link rel="modulepreload" href="/acri-doc/assets/chunks/framework.y0dCxTfh.js">
    <link rel="modulepreload" href="/acri-doc/assets/chunks/theme.Bp1HvQii.js">
    <link rel="modulepreload" href="/acri-doc/assets/guide_aop.md.AOyHXA6y.lean.js">
    <link rel="icon" href="/acri-doc/logo.ico">
    <script id="check-dark-mode">(()=>{const e=localStorage.getItem("vitepress-theme-appearance")||"auto",a=window.matchMedia("(prefers-color-scheme: dark)").matches;(!e||e==="auto"?a:e==="dark")&&document.documentElement.classList.add("dark")})();</script>
    <script id="check-mac-os">document.documentElement.classList.toggle("mac",/Mac|iPhone|iPod|iPad/i.test(navigator.platform));</script>
  </head>
  <body>
    <div id="app"><div class="Layout" data-v-5a346dfe><!--[--><!--]--><!--[--><span tabindex="-1" data-v-0f60ec36></span><a href="#VPContent" class="VPSkipLink visually-hidden" data-v-0f60ec36> Skip to content </a><!--]--><!----><header class="VPNav" data-v-5a346dfe data-v-ae24b3ad><div class="VPNavBar has-sidebar" data-v-ae24b3ad data-v-d83f3580><div class="container" data-v-d83f3580><div class="title" data-v-d83f3580><div class="VPNavBarTitle has-sidebar" data-v-d83f3580 data-v-86d1bed8><a class="title" href="/acri-doc/" data-v-86d1bed8><!--[--><!--]--><!----><!--[-->Acri-doc<!--]--><!--[--><!--]--></a></div></div><div class="content" data-v-d83f3580><div class="curtain" data-v-d83f3580></div><div class="content-body" data-v-d83f3580><!--[--><!--]--><div class="VPNavBarSearch search" data-v-d83f3580><!----><div id="docsearch"><button type="button" class="DocSearch DocSearch-Button" aria-label="Search"><span class="DocSearch-Button-Container"><svg width="20" height="20" class="DocSearch-Search-Icon" viewBox="0 0 20 20"><path d="M14.386 14.386l4.0877 4.0877-4.0877-4.0877c-2.9418 2.9419-7.7115 2.9419-10.6533 0-2.9419-2.9418-2.9419-7.7115 0-10.6533 2.9418-2.9419 7.7115-2.9419 10.6533 0 2.9419 2.9418 2.9419 7.7115 0 10.6533z" stroke="currentColor" fill="none" fill-rule="evenodd" stroke-linecap="round" stroke-linejoin="round"></path></svg><span class="DocSearch-Button-Placeholder">Search</span></span><span class="DocSearch-Button-Keys"><span class="DocSearch-Button-Key">Meta</span><span class="DocSearch-Button-Key">K</span></span></button></div></div><nav aria-labelledby="main-nav-aria-label" class="VPNavBarMenu menu" data-v-d83f3580 data-v-7f418b0f><span id="main-nav-aria-label" class="visually-hidden" data-v-7f418b0f>Main Navigation</span><!--[--><!--[--><a class="VPLink link VPNavBarMenuLink" href="/acri-doc/" tabindex="0" data-v-7f418b0f data-v-42ef59de><!--[--><span data-v-42ef59de>首页</span><!--]--></a><!--]--><!--[--><a class="VPLink link VPNavBarMenuLink" href="/acri-doc/guide/" tabindex="0" data-v-7f418b0f data-v-42ef59de><!--[--><span data-v-42ef59de>文档</span><!--]--></a><!--]--><!--[--><a class="VPLink link VPNavBarMenuLink active" href="/acri-doc/guide/aop.html" tabindex="0" data-v-7f418b0f data-v-42ef59de><!--[--><span data-v-42ef59de>AOP</span><!--]--></a><!--]--><!--[--><div class="VPFlyout VPNavBarMenuGroup" data-v-7f418b0f data-v-9c007e85><button type="button" class="button" aria-haspopup="true" aria-expanded="false" data-v-9c007e85><span class="text" data-v-9c007e85><!----><span data-v-9c007e85>Release 1.4.1</span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" viewbox="0 0 24 24" class="text-icon" data-v-9c007e85><path d="M12,16c-0.3,0-0.5-0.1-0.7-0.3l-6-6c-0.4-0.4-0.4-1,0-1.4s1-0.4,1.4,0l5.3,5.3l5.3-5.3c0.4-0.4,1-0.4,1.4,0s0.4,1,0,1.4l-6,6C12.5,15.9,12.3,16,12,16z"></path></svg></span></button><div class="menu" data-v-9c007e85><div class="VPMenu" data-v-9c007e85 data-v-e7ea1737><div class="items" data-v-e7ea1737><!--[--><!--[--><div class="VPMenuLink" data-v-e7ea1737 data-v-43f1e123><a class="VPLink link vp-external-link-icon" href="https://central.sonatype.com/artifact/cn.fntop/acri-spring-boot-starter/1.4.1" target="_blank" rel="noreferrer" data-v-43f1e123><!--[-->1.4.1<!--]--></a></div><!--]--><!--[--><div class="VPMenuLink" data-v-e7ea1737 data-v-43f1e123><a class="VPLink link vp-external-link-icon" href="https://central.sonatype.com/artifact/cn.fntop/acri-spring-boot-starter/1.4.0" target="_blank" rel="noreferrer" data-v-43f1e123><!--[-->1.4.0<!--]--></a></div><!--]--><!--[--><div class="VPMenuLink" data-v-e7ea1737 data-v-43f1e123><a class="VPLink link vp-external-link-icon" href="https://central.sonatype.com/artifact/cn.fntop/acri-spring-boot-starter/1.3.0" target="_blank" rel="noreferrer" data-v-43f1e123><!--[-->1.3.0<!--]--></a></div><!--]--><!--[--><div class="VPMenuLink" data-v-e7ea1737 data-v-43f1e123><a class="VPLink link vp-external-link-icon" href="https://central.sonatype.com/artifact/cn.fntop/acri-core/1.2.0" target="_blank" rel="noreferrer" data-v-43f1e123><!--[-->1.2.0<!--]--></a></div><!--]--><!--[--><div class="VPMenuLink" data-v-e7ea1737 data-v-43f1e123><a class="VPLink link vp-external-link-icon" href="https://central.sonatype.com/artifact/cn.fntop/acri-core/1.1.0" target="_blank" rel="noreferrer" data-v-43f1e123><!--[-->1.1.0<!--]--></a></div><!--]--><!--[--><div class="VPMenuLink" data-v-e7ea1737 data-v-43f1e123><a class="VPLink link vp-external-link-icon" href="https://central.sonatype.com/artifact/cn.fntop/acri-core/1.0.0" target="_blank" rel="noreferrer" data-v-43f1e123><!--[-->1.0.0<!--]--></a></div><!--]--><!--]--></div><!--[--><!--]--></div></div></div><!--]--><!--[--><a class="VPLink link VPNavBarMenuLink" href="/acri-doc/guide/contact.html" tabindex="0" data-v-7f418b0f data-v-42ef59de><!--[--><span data-v-42ef59de>联系方式</span><!--]--></a><!--]--><!--]--></nav><!----><div class="VPNavBarAppearance appearance" data-v-d83f3580 data-v-e6aabb21><button class="VPSwitch VPSwitchAppearance" type="button" role="switch" title="Switch to dark theme" aria-checked="false" data-v-e6aabb21 data-v-cbbe1149 data-v-b1685198><span class="check" data-v-b1685198><span class="icon" data-v-b1685198><!--[--><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" viewbox="0 0 24 24" class="sun" data-v-cbbe1149><path d="M12,18c-3.3,0-6-2.7-6-6s2.7-6,6-6s6,2.7,6,6S15.3,18,12,18zM12,8c-2.2,0-4,1.8-4,4c0,2.2,1.8,4,4,4c2.2,0,4-1.8,4-4C16,9.8,14.2,8,12,8z"></path><path d="M12,4c-0.6,0-1-0.4-1-1V1c0-0.6,0.4-1,1-1s1,0.4,1,1v2C13,3.6,12.6,4,12,4z"></path><path d="M12,24c-0.6,0-1-0.4-1-1v-2c0-0.6,0.4-1,1-1s1,0.4,1,1v2C13,23.6,12.6,24,12,24z"></path><path d="M5.6,6.6c-0.3,0-0.5-0.1-0.7-0.3L3.5,4.9c-0.4-0.4-0.4-1,0-1.4s1-0.4,1.4,0l1.4,1.4c0.4,0.4,0.4,1,0,1.4C6.2,6.5,5.9,6.6,5.6,6.6z"></path><path d="M19.8,20.8c-0.3,0-0.5-0.1-0.7-0.3l-1.4-1.4c-0.4-0.4-0.4-1,0-1.4s1-0.4,1.4,0l1.4,1.4c0.4,0.4,0.4,1,0,1.4C20.3,20.7,20,20.8,19.8,20.8z"></path><path d="M3,13H1c-0.6,0-1-0.4-1-1s0.4-1,1-1h2c0.6,0,1,0.4,1,1S3.6,13,3,13z"></path><path d="M23,13h-2c-0.6,0-1-0.4-1-1s0.4-1,1-1h2c0.6,0,1,0.4,1,1S23.6,13,23,13z"></path><path d="M4.2,20.8c-0.3,0-0.5-0.1-0.7-0.3c-0.4-0.4-0.4-1,0-1.4l1.4-1.4c0.4-0.4,1-0.4,1.4,0s0.4,1,0,1.4l-1.4,1.4C4.7,20.7,4.5,20.8,4.2,20.8z"></path><path d="M18.4,6.6c-0.3,0-0.5-0.1-0.7-0.3c-0.4-0.4-0.4-1,0-1.4l1.4-1.4c0.4-0.4,1-0.4,1.4,0s0.4,1,0,1.4l-1.4,1.4C18.9,6.5,18.6,6.6,18.4,6.6z"></path></svg><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" viewbox="0 0 24 24" class="moon" data-v-cbbe1149><path d="M12.1,22c-0.3,0-0.6,0-0.9,0c-5.5-0.5-9.5-5.4-9-10.9c0.4-4.8,4.2-8.6,9-9c0.4,0,0.8,0.2,1,0.5c0.2,0.3,0.2,0.8-0.1,1.1c-2,2.7-1.4,6.4,1.3,8.4c2.1,1.6,5,1.6,7.1,0c0.3-0.2,0.7-0.3,1.1-0.1c0.3,0.2,0.5,0.6,0.5,1c-0.2,2.7-1.5,5.1-3.6,6.8C16.6,21.2,14.4,22,12.1,22zM9.3,4.4c-2.9,1-5,3.6-5.2,6.8c-0.4,4.4,2.8,8.3,7.2,8.7c2.1,0.2,4.2-0.4,5.8-1.8c1.1-0.9,1.9-2.1,2.4-3.4c-2.5,0.9-5.3,0.5-7.5-1.1C9.2,11.4,8.1,7.7,9.3,4.4z"></path></svg><!--]--></span></span></button></div><div class="VPSocialLinks VPNavBarSocialLinks social-links" data-v-d83f3580 data-v-0394ad82 data-v-7bc22406><!--[--><a class="VPSocialLink no-icon" href="https://github.com/FnTop/Acri" aria-label="github" target="_blank" rel="noopener" data-v-7bc22406 data-v-f80f8133><svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>GitHub</title><path d="M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12"/></svg></a><!--]--></div><div class="VPFlyout VPNavBarExtra extra" data-v-d83f3580 data-v-d0bd9dde data-v-9c007e85><button type="button" class="button" aria-haspopup="true" aria-expanded="false" aria-label="extra navigation" data-v-9c007e85><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" viewbox="0 0 24 24" class="icon" data-v-9c007e85><circle cx="12" cy="12" r="2"></circle><circle cx="19" cy="12" r="2"></circle><circle cx="5" cy="12" r="2"></circle></svg></button><div class="menu" data-v-9c007e85><div class="VPMenu" data-v-9c007e85 data-v-e7ea1737><!----><!--[--><!--[--><!----><div class="group" data-v-d0bd9dde><div class="item appearance" data-v-d0bd9dde><p class="label" data-v-d0bd9dde>Appearance</p><div class="appearance-action" data-v-d0bd9dde><button class="VPSwitch VPSwitchAppearance" type="button" role="switch" title="Switch to dark theme" aria-checked="false" data-v-d0bd9dde data-v-cbbe1149 data-v-b1685198><span class="check" data-v-b1685198><span class="icon" data-v-b1685198><!--[--><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" viewbox="0 0 24 24" class="sun" data-v-cbbe1149><path d="M12,18c-3.3,0-6-2.7-6-6s2.7-6,6-6s6,2.7,6,6S15.3,18,12,18zM12,8c-2.2,0-4,1.8-4,4c0,2.2,1.8,4,4,4c2.2,0,4-1.8,4-4C16,9.8,14.2,8,12,8z"></path><path d="M12,4c-0.6,0-1-0.4-1-1V1c0-0.6,0.4-1,1-1s1,0.4,1,1v2C13,3.6,12.6,4,12,4z"></path><path d="M12,24c-0.6,0-1-0.4-1-1v-2c0-0.6,0.4-1,1-1s1,0.4,1,1v2C13,23.6,12.6,24,12,24z"></path><path d="M5.6,6.6c-0.3,0-0.5-0.1-0.7-0.3L3.5,4.9c-0.4-0.4-0.4-1,0-1.4s1-0.4,1.4,0l1.4,1.4c0.4,0.4,0.4,1,0,1.4C6.2,6.5,5.9,6.6,5.6,6.6z"></path><path d="M19.8,20.8c-0.3,0-0.5-0.1-0.7-0.3l-1.4-1.4c-0.4-0.4-0.4-1,0-1.4s1-0.4,1.4,0l1.4,1.4c0.4,0.4,0.4,1,0,1.4C20.3,20.7,20,20.8,19.8,20.8z"></path><path d="M3,13H1c-0.6,0-1-0.4-1-1s0.4-1,1-1h2c0.6,0,1,0.4,1,1S3.6,13,3,13z"></path><path d="M23,13h-2c-0.6,0-1-0.4-1-1s0.4-1,1-1h2c0.6,0,1,0.4,1,1S23.6,13,23,13z"></path><path d="M4.2,20.8c-0.3,0-0.5-0.1-0.7-0.3c-0.4-0.4-0.4-1,0-1.4l1.4-1.4c0.4-0.4,1-0.4,1.4,0s0.4,1,0,1.4l-1.4,1.4C4.7,20.7,4.5,20.8,4.2,20.8z"></path><path d="M18.4,6.6c-0.3,0-0.5-0.1-0.7-0.3c-0.4-0.4-0.4-1,0-1.4l1.4-1.4c0.4-0.4,1-0.4,1.4,0s0.4,1,0,1.4l-1.4,1.4C18.9,6.5,18.6,6.6,18.4,6.6z"></path></svg><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" viewbox="0 0 24 24" class="moon" data-v-cbbe1149><path d="M12.1,22c-0.3,0-0.6,0-0.9,0c-5.5-0.5-9.5-5.4-9-10.9c0.4-4.8,4.2-8.6,9-9c0.4,0,0.8,0.2,1,0.5c0.2,0.3,0.2,0.8-0.1,1.1c-2,2.7-1.4,6.4,1.3,8.4c2.1,1.6,5,1.6,7.1,0c0.3-0.2,0.7-0.3,1.1-0.1c0.3,0.2,0.5,0.6,0.5,1c-0.2,2.7-1.5,5.1-3.6,6.8C16.6,21.2,14.4,22,12.1,22zM9.3,4.4c-2.9,1-5,3.6-5.2,6.8c-0.4,4.4,2.8,8.3,7.2,8.7c2.1,0.2,4.2-0.4,5.8-1.8c1.1-0.9,1.9-2.1,2.4-3.4c-2.5,0.9-5.3,0.5-7.5-1.1C9.2,11.4,8.1,7.7,9.3,4.4z"></path></svg><!--]--></span></span></button></div></div></div><div class="group" data-v-d0bd9dde><div class="item social-links" data-v-d0bd9dde><div class="VPSocialLinks social-links-list" data-v-d0bd9dde data-v-7bc22406><!--[--><a class="VPSocialLink no-icon" href="https://github.com/FnTop/Acri" aria-label="github" target="_blank" rel="noopener" data-v-7bc22406 data-v-f80f8133><svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>GitHub</title><path d="M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12"/></svg></a><!--]--></div></div></div><!--]--><!--]--></div></div></div><!--[--><!--]--><button type="button" class="VPNavBarHamburger hamburger" aria-label="mobile navigation" aria-expanded="false" aria-controls="VPNavScreen" data-v-d83f3580 data-v-e5dd9c1c><span class="container" data-v-e5dd9c1c><span class="top" data-v-e5dd9c1c></span><span class="middle" data-v-e5dd9c1c></span><span class="bottom" data-v-e5dd9c1c></span></span></button></div></div></div></div><!----></header><div class="VPLocalNav reached-top" data-v-5a346dfe data-v-f84a0989><button class="menu" aria-expanded="false" aria-controls="VPSidebarNav" data-v-f84a0989><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" viewbox="0 0 24 24" class="menu-icon" data-v-f84a0989><path d="M17,11H3c-0.6,0-1-0.4-1-1s0.4-1,1-1h14c0.6,0,1,0.4,1,1S17.6,11,17,11z"></path><path d="M21,7H3C2.4,7,2,6.6,2,6s0.4-1,1-1h18c0.6,0,1,0.4,1,1S21.6,7,21,7z"></path><path d="M21,15H3c-0.6,0-1-0.4-1-1s0.4-1,1-1h18c0.6,0,1,0.4,1,1S21.6,15,21,15z"></path><path d="M17,19H3c-0.6,0-1-0.4-1-1s0.4-1,1-1h14c0.6,0,1,0.4,1,1S17.6,19,17,19z"></path></svg><span class="menu-text" data-v-f84a0989>Menu</span></button><div class="VPLocalNavOutlineDropdown" style="--vp-vh:0px;" data-v-f84a0989 data-v-1c15a60a><button data-v-1c15a60a>返回顶部</button><!----></div></div><aside class="VPSidebar" data-v-5a346dfe data-v-7f44e717><div class="curtain" data-v-7f44e717></div><nav class="nav" id="VPSidebarNav" aria-labelledby="sidebar-aria-label" tabindex="-1" data-v-7f44e717><span class="visually-hidden" id="sidebar-aria-label" data-v-7f44e717> Sidebar Navigation </span><!--[--><!--]--><!--[--><div class="group" data-v-7f44e717><section class="VPSidebarItem level-0 has-active" data-v-7f44e717 data-v-e31bd47b><div class="item" role="button" tabindex="0" data-v-e31bd47b><div class="indicator" data-v-e31bd47b></div><h2 class="text" data-v-e31bd47b>指南</h2><!----></div><div class="items" data-v-e31bd47b><!--[--><div class="VPSidebarItem level-1 is-link" data-v-e31bd47b data-v-e31bd47b><div class="item" data-v-e31bd47b><div class="indicator" data-v-e31bd47b></div><a class="VPLink link link" href="/acri-doc/guide/" data-v-e31bd47b><!--[--><p class="text" data-v-e31bd47b>文档</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-e31bd47b data-v-e31bd47b><div class="item" data-v-e31bd47b><div class="indicator" data-v-e31bd47b></div><a class="VPLink link link" href="/acri-doc/guide/aop.html" data-v-e31bd47b><!--[--><p class="text" data-v-e31bd47b>AOP切面</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-e31bd47b data-v-e31bd47b><div class="item" data-v-e31bd47b><div class="indicator" data-v-e31bd47b></div><a class="VPLink link link" href="/acri-doc/guide/version.html" data-v-e31bd47b><!--[--><p class="text" data-v-e31bd47b>版本日志</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-e31bd47b data-v-e31bd47b><div class="item" data-v-e31bd47b><div class="indicator" data-v-e31bd47b></div><a class="VPLink link link" href="/acri-doc/guide/contact.html" data-v-e31bd47b><!--[--><p class="text" data-v-e31bd47b>联系方式</p><!--]--></a><!----></div><!----></div><!--]--></div></section></div><!--]--><!--[--><!--]--></nav></aside><div class="VPContent has-sidebar" id="VPContent" data-v-5a346dfe data-v-669faec9><div class="VPDoc has-sidebar has-aside" data-v-669faec9 data-v-6b87e69f><!--[--><!--]--><div class="container" data-v-6b87e69f><div class="aside" data-v-6b87e69f><div class="aside-curtain" data-v-6b87e69f></div><div class="aside-container" data-v-6b87e69f><div class="aside-content" data-v-6b87e69f><div class="VPDocAside" data-v-6b87e69f data-v-3f215769><!--[--><!--]--><!--[--><!--]--><div class="VPDocAsideOutline" role="navigation" data-v-3f215769 data-v-d330b1bb><div class="content" data-v-d330b1bb><div class="outline-marker" data-v-d330b1bb></div><div class="outline-title" role="heading" aria-level="2" data-v-d330b1bb>目录</div><nav aria-labelledby="doc-outline-aria-label" data-v-d330b1bb><span class="visually-hidden" id="doc-outline-aria-label" data-v-d330b1bb> Table of Contents for current page </span><ul class="root" data-v-d330b1bb data-v-d0ee3533><!--[--><!--]--></ul></nav></div></div><!--[--><!--]--><div class="spacer" data-v-3f215769></div><!--[--><!--]--><!----><!--[--><!--]--><!--[--><!--]--></div></div></div></div><div class="content" data-v-6b87e69f><div class="content-container" data-v-6b87e69f><!--[--><!--]--><!----><main class="main" data-v-6b87e69f><div style="position:relative;" class="vp-doc _acri-doc_guide_aop" data-v-6b87e69f><div><h2 id="切面描述" tabindex="-1">切面描述 <a class="header-anchor" href="#切面描述" aria-label="Permalink to &quot;切面描述&quot;">​</a></h2><p><code>@AcriAspect(fallback=Custom.class,before=true，beforeMethod=&quot;before&quot;)</code></p><p><code>注释事项:</code>任何自定义切面方法，方法的参数都是<code>AcriContainer container</code>,可以从该容器中获取调用方法的<code>返回值、参数、异常信息</code></p><table><thead><tr><th style="text-align:left;">配置项</th><th style="text-align:left;">默认值</th><th style="text-align:left;">备注</th></tr></thead><tbody><tr><td style="text-align:left;">fallback</td><td style="text-align:left;">null</td><td style="text-align:left;">自定义切面类</td></tr><tr><td style="text-align:left;">before</td><td style="text-align:left;">false</td><td style="text-align:left;">是否启用前置通知</td></tr><tr><td style="text-align:left;">around</td><td style="text-align:left;">false</td><td style="text-align:left;">是否启用环绕通知</td></tr><tr><td style="text-align:left;">after</td><td style="text-align:left;">false</td><td style="text-align:left;">是否启用后置通知</td></tr><tr><td style="text-align:left;">throwing</td><td style="text-align:left;">false</td><td style="text-align:left;">是否启用异常通知</td></tr><tr><td style="text-align:left;">beforeMethod</td><td style="text-align:left;">before</td><td style="text-align:left;">启用前置通知调用的默认方法名称</td></tr><tr><td style="text-align:left;">beforeAroundMethod</td><td style="text-align:left;">beforeAround</td><td style="text-align:left;">启用环绕通知（前置环绕）调用的默认方法名称</td></tr><tr><td style="text-align:left;">afterAroundMethod</td><td style="text-align:left;">afterAround</td><td style="text-align:left;">启用环绕通知（后置环绕）调用的默认方法名称</td></tr><tr><td style="text-align:left;">afterMethod</td><td style="text-align:left;">after</td><td style="text-align:left;">启用后置通知调用的默认方法名称</td></tr><tr><td style="text-align:left;">throwingMethod</td><td style="text-align:left;">throwing</td><td style="text-align:left;">启用异常通知调用的默认方法名称</td></tr></tbody></table><h2 id="使用案例" tabindex="-1">使用案例 <a class="header-anchor" href="#使用案例" aria-label="Permalink to &quot;使用案例&quot;">​</a></h2><p><code>@AcriAspect(fallback = TestController.class, around = true, throwing = true, before = true, after = true)</code></p><div class="language- vp-adaptive-theme line-numbers-mode"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span>@RestController</span></span>
<span class="line"><span>@Slf4j</span></span>
<span class="line"><span>public class TestController {</span></span>
<span class="line"><span>    //Acri AOP</span></span>
<span class="line"><span>    @AcriAspect(fallback = TestController.class, around = true, throwing = true, before = true, after = true)</span></span>
<span class="line"><span>    @GetMapping(&quot;/login&quot;)</span></span>
<span class="line"><span>    public User login(User param) {</span></span>
<span class="line"><span>        log.info(&quot;登录中,{}&quot;, param);</span></span>
<span class="line"><span>//        int i = 1 / 0;</span></span>
<span class="line"><span>        return new User();</span></span>
<span class="line"><span>    }</span></span>
<span class="line"><span>    //前置通知</span></span>
<span class="line"><span>    public void before(AcriContainer container) {</span></span>
<span class="line"><span>        log.info(&quot;before =&gt; {}&quot;, container.getParams() == null ? &quot;&quot; : container.getParams().toString());</span></span>
<span class="line"><span>    }</span></span>
<span class="line"><span>    //后置通知</span></span>
<span class="line"><span>    public void after(AcriContainer container) {</span></span>
<span class="line"><span>        log.info(&quot;after =&gt; {}&quot;, container.getResult() == null ? &quot;&quot; : container.getResult().toString());</span></span>
<span class="line"><span>        log.info(&quot;after =&gt; {}&quot;, container.getParams() == null ? &quot;&quot; : container.getParams().toString());</span></span>
<span class="line"><span>    }</span></span>
<span class="line"><span>    //前置环绕</span></span>
<span class="line"><span>    public void beforeAround(AcriContainer container) {</span></span>
<span class="line"><span>        log.info(&quot;beforeAround =&gt; {}&quot;, container.getParams() == null ? &quot;&quot; : container.getParams().toString());</span></span>
<span class="line"><span>    }</span></span>
<span class="line"><span>    //后置环绕</span></span>
<span class="line"><span>    public void afterAround(AcriContainer container) {</span></span>
<span class="line"><span>        log.info(&quot;afterAround =&gt; {}&quot;, container.getResult() == null ? &quot;&quot; : container.getResult().toString());</span></span>
<span class="line"><span>        log.info(&quot;afterAround =&gt; {}&quot;, container.getParams() == null ? &quot;&quot; : container.getParams().toString());</span></span>
<span class="line"><span>    }</span></span>
<span class="line"><span>    //异常通知</span></span>
<span class="line"><span>    public void throwing(AcriContainer container) {</span></span>
<span class="line"><span>        log.info(&quot;throwing =&gt; {}&quot;, container.getException() == null ? &quot;&quot; : container.getException().toString());</span></span>
<span class="line"><span>        log.info(&quot;throwing =&gt; {}&quot;, container.getParams() == null ? &quot;&quot; : container.getParams().toString());</span></span>
<span class="line"><span>    }</span></span>
<span class="line"><span>}</span></span></code></pre><div class="line-numbers-wrapper" aria-hidden="true"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br><span class="line-number">8</span><br><span class="line-number">9</span><br><span class="line-number">10</span><br><span class="line-number">11</span><br><span class="line-number">12</span><br><span class="line-number">13</span><br><span class="line-number">14</span><br><span class="line-number">15</span><br><span class="line-number">16</span><br><span class="line-number">17</span><br><span class="line-number">18</span><br><span class="line-number">19</span><br><span class="line-number">20</span><br><span class="line-number">21</span><br><span class="line-number">22</span><br><span class="line-number">23</span><br><span class="line-number">24</span><br><span class="line-number">25</span><br><span class="line-number">26</span><br><span class="line-number">27</span><br><span class="line-number">28</span><br><span class="line-number">29</span><br><span class="line-number">30</span><br><span class="line-number">31</span><br><span class="line-number">32</span><br><span class="line-number">33</span><br><span class="line-number">34</span><br><span class="line-number">35</span><br></div></div><h2 id="启用切面" tabindex="-1">启用切面 <a class="header-anchor" href="#启用切面" aria-label="Permalink to &quot;启用切面&quot;">​</a></h2><p>比如启用前置切面，只需要设置<code>before = true</code>即可</p><div class="language- vp-adaptive-theme line-numbers-mode"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span>@RestController</span></span>
<span class="line"><span>@Slf4j</span></span>
<span class="line"><span>public class TestController {</span></span>
<span class="line"><span></span></span>
<span class="line"><span>    @AcriAspect(fallback = TestController.class, before = true)</span></span>
<span class="line"><span>    @GetMapping(&quot;/login&quot;)</span></span>
<span class="line"><span>    public User login(User param) {</span></span>
<span class="line"><span>        log.info(&quot;登录中,{}&quot;, param);</span></span>
<span class="line"><span>        return new User();</span></span>
<span class="line"><span>    }</span></span>
<span class="line"><span>    public void before(AcriContainer container) {</span></span>
<span class="line"><span>        log.info(&quot;before =&gt; {}&quot;, container.getParams() == null ? &quot;&quot; : container.getParams().toString());</span></span>
<span class="line"><span>    }</span></span>
<span class="line"><span>   </span></span>
<span class="line"><span>}</span></span></code></pre><div class="line-numbers-wrapper" aria-hidden="true"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br><span class="line-number">8</span><br><span class="line-number">9</span><br><span class="line-number">10</span><br><span class="line-number">11</span><br><span class="line-number">12</span><br><span class="line-number">13</span><br><span class="line-number">14</span><br><span class="line-number">15</span><br></div></div><h2 id="自定义切面类、切面方法" tabindex="-1">自定义切面类、切面方法 <a class="header-anchor" href="#自定义切面类、切面方法" aria-label="Permalink to &quot;自定义切面类、切面方法&quot;">​</a></h2><p><code>fallback = TestController.class</code>,自定义切面只需要将fallback对应的类换成自定义的即可。自定义切面方法 只要在注解对应切面设置方法名称即可，比如前置切面方法的自定义<code>beforeMethod=&quot;customBefore&quot;</code></p><p><code>注意事项：</code>如果没有设置切面方法，在自定义切面类中定义的方法名=默认切面方法，比如前置切面没有设置<code>beforeMethod</code>，自定义方法名称就必须是<code>before</code>,而不是<code>customBefore</code>。因为前置切面<code>默认方法名是before</code></p><div class="language- vp-adaptive-theme line-numbers-mode"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span>@RestController</span></span>
<span class="line"><span>@Slf4j</span></span>
<span class="line"><span>public class TestController {</span></span>
<span class="line"><span></span></span>
<span class="line"><span>    @AcriAspect(fallback = TestController.class, before = true，beforeMethod=&quot;customBefore&quot;)</span></span>
<span class="line"><span>    @GetMapping(&quot;/login&quot;)</span></span>
<span class="line"><span>    public User login(User param) {</span></span>
<span class="line"><span>        log.info(&quot;登录中,{}&quot;, param);</span></span>
<span class="line"><span>        return new User();</span></span>
<span class="line"><span>    }</span></span>
<span class="line"><span>    public void customBefore(AcriContainer container) {</span></span>
<span class="line"><span>        log.info(&quot;before =&gt; {}&quot;, container.getParams() == null ? &quot;&quot; : container.getParams().toString());</span></span>
<span class="line"><span>    }</span></span>
<span class="line"><span>   </span></span>
<span class="line"><span>}</span></span></code></pre><div class="line-numbers-wrapper" aria-hidden="true"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br><span class="line-number">8</span><br><span class="line-number">9</span><br><span class="line-number">10</span><br><span class="line-number">11</span><br><span class="line-number">12</span><br><span class="line-number">13</span><br><span class="line-number">14</span><br><span class="line-number">15</span><br></div></div></div></div></main><footer class="VPDocFooter" data-v-6b87e69f data-v-48f9bb55><!--[--><!--]--><div class="edit-info" data-v-48f9bb55><!----><div class="last-updated" data-v-48f9bb55><p class="VPLastUpdated" data-v-48f9bb55 data-v-7e05ebdb>上次更新: <time datetime="2023-12-09T15:37:26.000Z" data-v-7e05ebdb></time></p></div></div><nav class="prev-next" data-v-48f9bb55><div class="pager" data-v-48f9bb55><a class="VPLink link pager-link prev" href="/acri-doc/guide/" data-v-48f9bb55><!--[--><span class="desc" data-v-48f9bb55>上一篇</span><span class="title" data-v-48f9bb55>文档</span><!--]--></a></div><div class="pager" data-v-48f9bb55><a class="VPLink link pager-link next" href="/acri-doc/guide/version.html" data-v-48f9bb55><!--[--><span class="desc" data-v-48f9bb55>下一篇</span><span class="title" data-v-48f9bb55>版本日志</span><!--]--></a></div></nav></footer><!--[--><!--]--></div></div></div><!--[--><!--]--></div></div><footer class="VPFooter has-sidebar" data-v-5a346dfe data-v-e315a0ad><div class="container" data-v-e315a0ad><p class="message" data-v-e315a0ad>Released 1.4.1 </p><p class="copyright" data-v-e315a0ad>Copyright © 2023 Acri</p></div></footer><!--[--><!--]--></div></div>
    <script>window.__VP_HASH_MAP__=JSON.parse("{\"guide_version.md\":\"dnYAfm5_\",\"guide_aop.md\":\"AOyHXA6y\",\"guide_contact.md\":\"iT3PfRxk\",\"index.md\":\"6Ulu0hLg\",\"guide_index.md\":\"KbsWPP9H\"}");window.__VP_SITE_DATA__=JSON.parse("{\"lang\":\"en-US\",\"dir\":\"ltr\",\"title\":\"Acri-doc\",\"description\":\"A VitePress site\",\"base\":\"/acri-doc/\",\"head\":[],\"router\":{\"prefetchLinks\":true},\"appearance\":true,\"themeConfig\":{\"returnToTopLabel\":\"返回顶部\",\"outline\":{\"level\":\"deep\",\"label\":\"目录\"},\"socialLinks\":[{\"icon\":\"github\",\"link\":\"https://github.com/FnTop/Acri\"}],\"lastUpdatedText\":\"上次更新\",\"footer\":{\"message\":\"Released 1.4.1 \",\"copyright\":\"Copyright © 2023 Acri\"},\"nav\":[{\"text\":\"首页\",\"link\":\"/\"},{\"text\":\"文档\",\"link\":\"/guide/\"},{\"text\":\"AOP\",\"link\":\"/guide/aop\"},{\"text\":\"Release 1.4.1\",\"items\":[{\"text\":\"1.4.1\",\"link\":\"https://central.sonatype.com/artifact/cn.fntop/acri-spring-boot-starter/1.4.1\"},{\"text\":\"1.4.0\",\"link\":\"https://central.sonatype.com/artifact/cn.fntop/acri-spring-boot-starter/1.4.0\"},{\"text\":\"1.3.0\",\"link\":\"https://central.sonatype.com/artifact/cn.fntop/acri-spring-boot-starter/1.3.0\"},{\"text\":\"1.2.0\",\"link\":\"https://central.sonatype.com/artifact/cn.fntop/acri-core/1.2.0\"},{\"text\":\"1.1.0\",\"link\":\"https://central.sonatype.com/artifact/cn.fntop/acri-core/1.1.0\"},{\"text\":\"1.0.0\",\"link\":\"https://central.sonatype.com/artifact/cn.fntop/acri-core/1.0.0\"}]},{\"text\":\"联系方式\",\"link\":\"/guide/contact\",\"activeMatch\":\"/guide/contact\"}],\"sidebar\":{\"/guide/\":[{\"text\":\"指南\",\"items\":[{\"text\":\"文档\",\"link\":\"/guide/\"},{\"text\":\"AOP切面\",\"link\":\"/guide/aop\"},{\"text\":\"版本日志\",\"link\":\"/guide/version\"},{\"text\":\"联系方式\",\"link\":\"/guide/contact\"}]}]},\"docFooter\":{\"prev\":\"上一篇\",\"next\":\"下一篇\"}},\"locales\":{},\"scrollOffset\":90,\"cleanUrls\":false}");</script>
    
  </body>
</html>